﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PendingRejectedPopUp.aspx.cs" Inherits="logicunivesityinventorystore.Department.PendingRejectedPopUp" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
      <title></title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
      <script language="javascript" type="text/javascript">
          function getbacktostepone() {
              window.location = "EditExpanse.aspx";
          }
          function onSuccess() {
              setTimeout(okay, 2000);
          }
          function onError() {
              setTimeout(getbacktostepone, 2000);
          }
          function okay() {
              // window.parent.document.getElementById('btnOkay').
              window.parent.document.getElementById('btnOkay').click();

          }
          function cancel() {
              window.parent.document.getElementById('btnCancel').click();
          }
    </script>
      <style type="text/css">
          .style1
          {
              height: 57px;
          }
      </style>
</head>
<body style="margin: 0px; padding: 0px;">
    <form id="form1" runat="server">
    <input type="hidden" value="" runat="server" id="hdnWindowUIMODE" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="popup_Container">
        <div class="popup_Titlebar" id="PopupHeader">
            <div class="TitlebarRight" onclick="cancel();">
            <br />                                         
                  
            </div>
        </div>
        <div class="popup_Body">
            <asp:MultiView ID="MultiViewExpanse" runat="server" ActiveViewIndex="0">
                <asp:View ID="ViewInput" runat="server">                    
                    <div>
                        <table>
                            <tr>
                                <td>
                                    Category:
                                </td>
                                <td>
                                    Item:
                                </td>
                                <td>
                                    Qty:
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
                                        DataSourceID="ObjectDataSource1" DataTextField="CategoryName" 
                                        DataValueField="CategoryID" 
                                        onselectedindexchanged="ddlCategory_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                                        SelectMethod="FindAllCategory" TypeName="BusinessLogicLayer.ItemFacade" 
                                        OldValuesParameterFormatString="original_{0}">
                                    </asp:ObjectDataSource>
                                </td>
                                <td class="style1">
                                    <asp:DropDownList ID="ddlItem" runat="server" 
                                        DataSourceID="ObjectDataSource2" DataTextField="Description" 
                                        DataValueField="ItemCode" 
                                        onselectedindexchanged="ddlItem_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                                        SelectMethod="FindAllByCategory" TypeName="BusinessLogicLayer.ItemFacade" 
                                        OldValuesParameterFormatString="original_{0}">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="ddlCategory" Name="categoryID" 
                                                PropertyName="SelectedValue" Type="String" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                                </td>
                                <td class="style1">
                                    <asp:TextBox ID="txtQty" runat="server" Height="22px" Width="37px"></asp:TextBox>
                                    <asp:FilteredTextBoxExtender ID="txtQty_FilteredTextBoxExtender" runat="server" 
                                        Enabled="True" TargetControlID="txtQty" FilterType="Numbers">
                                    </asp:FilteredTextBoxExtender>
                                </td>
                                <td class="style1">
                                    &nbsp;<asp:Button ID="btnAdd" runat="server" Text="Add" onclick="btnAdd_Click" 
                                        style="width: 37px" />
                                </td>
                            </tr>
                        </table>
                          <asp:Label ID="lblMsg" runat="server" ForeColor="#FF3300"></asp:Label>
                        <br />
                          <asp:Label ID="lblDetails" Text="Order Details:" runat="server" />
                        <asp:GridView ID="gvOrderItems" runat="server" AutoGenerateColumns="False" 
                            >
                            <Columns>
                                <asp:BoundField DataField="ItemCode" HeaderText="Item Code" />
                                <asp:BoundField DataField="ItemName" HeaderText="Item Name" />
                                <asp:BoundField DataField="CategoryName" HeaderText="Category Name" />
                                <asp:BoundField DataField="Qty" HeaderText="Quantity" />
                            </Columns>
                        </asp:GridView>
                        <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
                            SelectMethod="getRequsitionDetails" 
                            TypeName="BusinessLogicLayer.RequisitionFacade">
                            <SelectParameters>
                                <asp:QueryStringParameter Name="formID" QueryStringField="formID" 
                                    Type="String" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <asp:TextBox ID="txtRemarks" runat="server" Height="34px" TextMode="MultiLine" 
                            Visible="False" Width="175px" ReadOnly="True"></asp:TextBox>
                        <asp:Label ID="Label1" runat="server"></asp:Label>
                    </div>
                </asp:View>
            </asp:MultiView>
        </div>
        <div class="popup_Buttons">
            <asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" />
            <input id="btnCancel" value="Back" type="button" onclick="cancel();" />
        </div>
    </div>
    </form>
</body>
</html>
